package com.retrofix.entity;

public class BaseEntity<T> {

    private static int SUCCESS_CODE = 200; //成功的code
    private int code;
    private String message;
    private T result;

    public boolean isSuccess(){
        return getCode() == SUCCESS_CODE;
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return message;
    }

    public void setMsg(String msg) {
        this.message = msg;
    }

    public T getData() {
        return result;
    }

    public void setData(T data) {
        this.result = data;
    }

}
